-- @owner: lihongji
-- @date: 2022/07/28
-- @testpoint: 参数外使用算术运算符测试

--step1:建序列;expect:成功
set extra_float_digits to 0;
drop sequence if exists sq_ustore_regr_intercept_0016;
create sequence sq_ustore_regr_intercept_0016 increment by 1 start with 10;

--step2:建表并插入数据;expect:成功
drop table if exists t_ustore_regr_intercept_0016 cascade;
create table t_ustore_regr_intercept_0016(
 col_1 integer,
 col_2 number(19,0),
 col_3 number(10,6)
) with (storage_type=ustore);

begin
 for i in 1..50 loop
  insert into t_ustore_regr_intercept_0016 values(
  i,
  sq_ustore_regr_intercept_0016.nextval,
  i+445.255
  );
 end loop;
end;
/
--step3:查询;expect:成功
select regr_intercept(abs(col_1)+ceil(col_3)*floor(col_3),abs(col_1)+ceil(col_3)*floor(col_2))/regr_intercept(cos(col_1)*exp(col_3/100)/ln(col_2)+1,cos(col_1)*exp(col_3/100)/ln(col_2))+regr_intercept(tan(col_1)+ceil(col_3)*sqrt(col_3),tan(col_1)+ceil(col_3)*sqrt(col_2)) from t_ustore_regr_intercept_0016 order by 1;

--step4:清理环境;expect:成功
drop sequence if exists sq_ustore_regr_intercept_0016;
drop table if exists t_ustore_regr_intercept_0016 cascade;